home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1991-09-09 | 13.4 KB | 478 lines |
- ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- '
- ' AMOS HARD DISK INSTALLER V2.1
- '
- ' English version
- '
- ' By P.J.Hickman & R.Vanner
- '
- ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Set Buffer 40
- Global SOURCE_NAME$,DEF,ARROW$,ARROW2$
- ARROW$=Chr$(171)+Chr$(171)+Chr$(171)
- ARROW2$=Chr$(187)+Chr$(187)+Chr$(187)
- DEF=True
- SET_UP_SCREEN
- On Menu Proc MENU_1,MENU_2
- Centre At(,10)+"Click right mouse button for menu"
- Bell
- While Mouse Key<>2 : Wend
- Repeat
- On Menu On
- Centre At(,10)+"Click right mouse button for menu"
- Until False
- Edit
- Procedure FINI
- Paper 0 : Pen 1
- Cls
- Centre At(,10)+"Installation complete"
- Bell
- Wait 250 : Locate 0,10 : Cline
- Centre At(,10)+"Click right mouse button for menu"
- End Proc
- Procedure DISK_COPY[WHERE$,T0$]
- Dim STOR$(150)
- TEMP=0
- Paper 0 : Pen 1 : Locate 0,8 : Cline : Centre WHERE$
- STOR$(0)=Dir First$(WHERE$)
- Repeat
- Inc TEMP
- STOR$(TEMP)=Dir Next$
- Until STOR$(TEMP)=""
- For LOP=0 To TEMP-1
- If(WHERE$<>"") and(Right$(WHERE$,1)<>"/") and(Right$(WHERE$,1)<>":")
- WHERE$=WHERE$+"/"
- End If
- If Left$(STOR$(LOP),1)="*"
- If Not Exist(T0$+Mid$(STOR$(LOP),2,29)-" ")
- Mkdir T0$+Mid$(STOR$(LOP),2,29)-" "
- End If
- DISK_COPY[WHERE$+Mid$(STOR$(LOP),2,29)-" ",T0$+Mid$(STOR$(LOP),2,29)-" "+"/"]
- Else
- FILE_COPY[WHERE$+Mid$(STOR$(LOP),2,29)-" ",T0$+Mid$(STOR$(LOP),2,29)-" "]
- End If
- Next LOP
- WHERE$=""
- End Proc
- Procedure FILE_COPY[SOURCE$,DEST$]
- FIND_LENGTH[SOURCE$]
- FILE_LENGTH=Param
- Reserve As Work 10,FILE_LENGTH
- Paper 0
- Pen 5
- Locate 0,10
- Centre "READING FILE '"+SOURCE$+"'"
- Bload SOURCE$,Start(10)
- Pen 4
- Centre At(,12)+"WRITING FILE '"+DEST$+"'"
- Bsave DEST$,Start(10) To Start(10)+FILE_LENGTH
- Erase 10
- Paper 0 : Pen 1
- Locate ,10 : Cline
- Locate ,12 : Cline
- Locate ,13 : Cline
- End Proc
- Procedure FIND_LENGTH[SOURCE$]
- Open In 1,SOURCE$
- L=Lof(1)
- Close
- End Proc[L]
- Procedure SET_UP_SCREEN
- Screen Open 1,640,200,8,Hires
- Palette $0,$FFF,$7F,$A7
- Flash Off : Curs Off : Cls 0
- Paper 0
- Pen 1
- Menu$(1)=" Startup Sequences "
- Menu$(1,1)=" "+ARROW2$+" Append Startup-Sequence "+ARROW$+" "
- Menu$(1,2)=" About Hard Disc Installer "
- Menu$(1,3)=" =============================== " : Menu Inactive(1,3)
- Menu$(1,4)=" Quit "
- Menu$(2)=" Installation "
- Menu$(2,1)=" AMOS master disk "
- Menu$(2,1,1)=" Just install AMOS "
- Menu$(2,1,2)=" Just AMOS help "
- Menu$(2,1,3)=" Install the whole disk "
- Menu$(2,1,4)=" Whole disk help "
- Menu$(2,2)=" AMOS data disk "
- Menu$(2,2,1)=" Install all games "
- Menu$(2,2,2)=" Help "
- Menu$(2,3)=" AMOS extras disk "
- Menu$(2,3,1)=" Install all extras "
- Menu$(2,3,2)=" Help "
- Menu On
- End Proc
- Procedure MENU_1
- If Choice(2)=1 and DEF=False
- DEF=True
- Menu$(1,1)=" "+ARROW2$+" Append Startup-Sequence "+ARROW$+" "
- Menu Calc
- Else
- If Choice(2)=1 and DEF=True
- DEF=False
- Menu$(1,1)=" Forget Startup-Sequence "
- Menu Calc
- End If
- End If
- If Choice(2)=2
- HELP_APPEND
- End If
- If Choice(2)=4
- Default
- Edit
- End If
- Cls
- End Proc
- Procedure MENU_2
- ' AMOS master disk
- If Choice(2)=1
- If Choice(3)=1
- INSTALL_JUST_AMOS
- End If
- If Choice(3)=2
- JUST_AMOS_HELP
- End If
- If Choice(3)=3
- INSTALL_MASTER
- End If
- If Choice(3)=4
- MASTER_HELP
- End If
- End If
- ' AMOS data disk
- If Choice(2)=2
- If Choice(3)=1
- INSTALL_DATA
- End If
- If Choice(3)=2
- HELP_DATA
- End If
- End If
- If Choice(2)=3
- If Choice(3)=1
- INSTALL_EXTRAS
- End If
- If Choice(3)=2
- EXTRAS_HELP
- End If
- End If
- Cls
- End Proc
- Procedure INSTALL_MASTER
- INSERT_DISK["AMOS:"]
- SELECT_DRIVE
- DEST$=Param$
- If DEST$<>"QUIT"
- Cls : Paper 2 : Pen 1
- Centre At(,4)+" Installing AMOS Master Disk "
- Restore FOLDERS
- Read AMOUNT
- For LOP=1 To AMOUNT
- Read FOLDER$
- If Exist("AMOS:"+FOLDER$)
- If Not Exist(DEST$+FOLDER$)
- Mkdir DEST$+FOLDER$
- End If
- SOURCE_NAME$="AMOS:"+FOLDER$+"/"
- DISK_COPY[SOURCE_NAME$,DEST$+FOLDER$+"/"]
- End If
- Next LOP
- FILE_COPY["AMOS:AMOS_System/Def_icon.info",DEST$+"AMOS_System/Def_icon.info"]
- FILE_COPY["AMOS:AMOS_System.info",DEST$+"AMOS_System.info"]
- FILE_COPY["AMOS:AMOS_System/AMOS1_3_NTSC.Env",DEST$+"AMOS_System/AMOS1_3_NTSC.Env"]
- FILE_COPY["AMOS:AMOS_System/AMOS1_3_PAL.Env",DEST$+"AMOS_System/AMOS1_3_PAL.Env"]
- Restore FILES
- Read AMOUNT
- For LOP=1 To AMOUNT
- Read FILE$
- If Exist("AMOS:"+FILE$)
- FILE_COPY["AMOS:"+FILE$,DEST$+FILE$]
- End If
- Next LOP
- If DEF=True
- SEQUENCE_APPEND["AMOS:",DEST$]
- End If
- Paper 0 : Pen 1
- Print At(0,10);Space$(80);
- Print At(0,4);Space$(80);
- FINI
- End If
- FOLDERS:
- Data 4,"Keyboards","AMOS_System","Manual","Help"
- FILES:
- Data 10,"Hithere.AMOS","AMOS1.3","AMOS1.3.Info"
- Data "Config1_3.AMOS","Install.AMOS"
- Data "Keyboard_Definer.AMOS","Help.ACC"
- Data "Map_Editor.AMOS"
- Data "SpriteX.AMOS","Sprite_Grabber.AMOS"
- End Proc
- Procedure INSTALL_DATA
- INSERT_DISK["AMOS_DATA:"]
- SELECT_DRIVE
- DEST$=Param$
- If DEST$<>"QUIT"
- Cls : Paper 2 : Pen 1
- Centre At(,4)+" Installing AMOS Data Disk "
- SOURCE_NAME$="AMOS_DATA:"
- DISK_COPY[SOURCE_NAME$,DEST$]
- FILE_COPY["AMOS_DATA:Castle_Amos.Amos.info",DEST$+"Castle_Amos.Amos.info"]
- FILE_COPY["AMOS_DATA:Number_Leap.Amos.info",DEST$+"Number_Leap.Amos.info"]
- FILE_COPY["AMOS_DATA:Magic_Forest.Amos.info",DEST$+"Magic_Forest.Amos.info"]
- FILE_COPY["AMOS_DATA:Amosteroids.Amos.info",DEST$+"Amosteroids.Amos.info"]
- If DEF=True
- SEQUENCE_APPEND["AMOS_DATA:",DEST$]
- End If
- FINI
- End If
- End Proc
- Procedure INSTALL_EXTRAS
- INSERT_DISK["EXTRAS:"]
- SELECT_DRIVE
- DEST$=Param$
- If DEST$<>"QUIT"
- Cls : Paper 2 : Pen 1
- Centre At(,4)+" Installing AMOS Extras Disk "
- SOURCE_NAME$="EXTRAS:"
- DISK_COPY[SOURCE_NAME$,DEST$]
- If DEF=True
- SEQUENCE_APPEND["EXTRAS:",DEST$]
- End If
- FINI
- End If
- End Proc
- Procedure SELECT_DRIVE
- F$=Fsel$(""," ","Please select the drive you","wish to install the files onto")
- If F$<>""
- If Right$(F$,1)<>":"
- While(Right$(F$,1)<>"/") and(Right$(F$,1)<>":")
- TEMP$=Left$(F$,Len(F$)-1)
- Swap TEMP$,F$
- Wend
- End If
- Else
- F$="QUIT"
- End If
- End Proc[F$]
- Procedure SEQUENCE_APPEND[N$,DEST$]
- F$=Fsel$("","","Please pick a Startup-Sequence","to append")
- If F$<>""
- Append 1,F$
- Print #1,"Assign "+N$+" "+DEST$;Chr$(10);
- Close
- End If
- End Proc
- Procedure HELP_APPEND
- Menu Off
- Cls 0
- Paper 3 : Pen 0
- Centre At(,3)+"General Help (please don't panic!!!)"
- Paper 0 : Pen 1
- Cdown : Cdown
- Centre "Some of the programs which are contained on your AMOS disks need"
- Cdown
- Centre "to access logical drives ( such as AMOS: )."
- Cdown
- Cdown
- Centre "With the `Alter Startup-Sequence' option selected you will be given"
- Cdown
- Centre "the option to alter a startup-sequence of your choice after "
- Cdown
- Centre "installation of the basic software is complete."
- Cdown
- Centre "WARNING- This option will add lines to any file you select, even"
- Cdown
- Centre "if it is not a true startup-sequence. Please use it with care."
- Cdown
- Cdown
- Centre "After you have read this please select the option which you require"
- Cdown
- Centre "and then follow all of the instructions which are displayed."
- Cdown
- Cdown
- Centre "This hard disk installer does not assume anything about the way"
- Cdown
- Centre "your system is set up, so it should be 100% compatible with all machines."
- MWAIT
- Cls 0
- Menu On
- End Proc
- Procedure HELP_DATA
- Menu Off
- Cls 0
- Paper 3 : Pen 0
- Centre At(,3)+"AMOS data disk Help (please don't panic!!!)"
- Paper 0 : Pen 1
- Cdown : Cdown
- Centre "The AMOS data disk contains all of the games which come free"
- Cdown
- Centre "with the package, including AMOSTEROIDS, MAGIC FOREST and CASTLE AMOS."
- Cdown
- Cdown
- Centre "If you select this option by accident you can change your mind"
- Cdown
- Centre "by clicking on the QUIT button when the file selector pops up."
- Cdown
- Cdown
- Centre "With the `Alter Startup-Sequence' option selected you will be given"
- Cdown
- Centre "the option to alter a startup-sequence of your choice after "
- Cdown
- Centre "installation of the basic software is complete."
- Cdown
- Centre "This will define a new logical drive called AMOS_DATA:"
- Cdown
- Centre "WARNING- This option will add lines to any file you select, even"
- Cdown
- Centre "if it is not a true startup-sequence. Please use it with care."
- MWAIT
- Cls 0
- Menu On
- End Proc
- Procedure EXTRAS_HELP
- Menu Off
- Cls 0
- Paper 3 : Pen 0
- Centre At(,3)+"Install extras Help"
- Paper 0 : Pen 1
- Cdown : Cdown
- Centre "The extras disk contains some very handy programs as well as"
- Cdown
- Centre "the free SPRITE 600 collection."
- Cdown
- Cdown
- Centre "If you select this option by accident you can change your mind"
- Cdown
- Centre "by clicking on the QUIT button when the file selector pops up."
- Cdown
- Cdown
- Centre "With the `Alter Startup-Sequence' option selected you will be given"
- Cdown
- Centre "the option to alter a startup-sequence of your choice after "
- Cdown
- Centre "installation of the basic software is complete."
- Cdown
- Centre "This will define a new logical drive called EXTRAS:"
- Cdown
- Centre "WARNING- This option will add lines to any file you select, even"
- Cdown
- Centre "if it is not a true startup-sequence. Please use it with care."
- MWAIT
- Cls 0
- Menu On
- End Proc
- Procedure JUST_AMOS_HELP
- Menu Off
- Cls 0
- Paper 3 : Pen 0
- Centre At(,3)+"Just install AMOS help"
- Paper 0 : Pen 1
- Cdown : Cdown
- Centre "This handy option will let you install AMOS onto your hard drive"
- Cdown
- Centre "all by itself, none of the support programs or accessories are"
- Cdown
- Centre "copied along with it."
- Cdown
- Cdown
- Centre "If you have the `Alter Startup-Sequence' option selected the program"
- Cdown
- Centre "will create a logical drive called AMOS: by altering a file which must"
- Cdown
- Centre "be specified after the installation is complete."
- MWAIT
- Cls 0
- Menu On
- End Proc
- Procedure MASTER_HELP
- Menu Off
- Cls 0
- Paper 3 : Pen 0
- Centre At(,3)+"Install whole AMOS help"
- Paper 0 : Pen 1
- Cdown : Cdown
- Centre "By selecting this menu option you will be able to copy AMOS and all of"
- Cdown
- Centre "the accessories supplied with it (keyboard definer, config editor etc.)"
- Cdown
- Centre "onto you hard drive."
- Cdown
- Cdown
- Centre "When you select this option a file selector will pop up asking you to choose"
- Cdown
- Centre "a place to put these files."
- Cdown
- Cdown
- Centre "If you select this option by accident you can change your mind"
- Cdown
- Centre "by clicking on the QUIT button when the file selector pops up."
- Cdown
- Cdown
- Centre "If you have the `Alter Startup-Sequence' option selected the program"
- Cdown
- Centre "will create a logical drive called AMOS: by altering a file which must"
- Cdown
- Centre "be specified after the installation is complete."
- MWAIT
- Cls 0
- Menu On
- End Proc
- Procedure INSTALL_JUST_AMOS
- INSERT_DISK["AMOS:"]
- SELECT_DRIVE
- DEST$=Param$
- If DEST$<>"QUIT"
- Cls : Paper 2 : Pen 1
- Centre At(,4)+" Installing AMOS "
- Restore FOLDERS2
- Read AMOUNT
- For LOP=1 To AMOUNT
- Read FOLDER$
- If Not Exist(DEST$+FOLDER$)
- Mkdir DEST$+FOLDER$
- End If
- SOURCE_NAME$="AMOS:"+FOLDER$+"/"
- DISK_COPY[SOURCE_NAME$,DEST$+FOLDER$+"/"]
- Next LOP
- FILE_COPY["AMOS:AMOS_System/Def_icon.info",DEST$+"AMOS_System/Def_icon.info"]
- FILE_COPY["AMOS:AMOS_System.info",DEST$+"AMOS_System.info"]
- FILE_COPY["AMOS:AMOS_System/AMOS1_3_NTSC.Env",DEST$+"AMOS_System/AMOS1_3_NTSC.ENV"]
- FILE_COPY["AMOS:AMOS_System/AMOS1_3_PAL.Env",DEST$+"AMOS_System/AMOS1_3_PAL.ENV"]
- Restore FILES2
- Read AMOUNT
- For LOP=1 To AMOUNT
- Read FILE$
- FILE_COPY["AMOS:"+FILE$,DEST$+FILE$]
- Next LOP
- If DEF=True
- SEQUENCE_APPEND["AMOS:",DEST$]
- End If
- Paper 0 : Pen 1
- Print At(0,10);Space$(80);
- Print At(0,4);Space$(80);
- End If
- FOLDERS2:
- Data 1,"AMOS_System"
- FILES2:
- Data 2,"AMOS1.3","AMOS1.3.info"
- End Proc
- Procedure MWAIT
- Paper 3
- Pen 0
- Centre At(,23)+" CLICK MOUSE TO CONTINUE"
- Paper 0
- Pen 1
- While Mouse Key=0 : Wend
- Bell
- Print At(0,25);Space$(80);
- End Proc
- Procedure INSERT_DISK[NAME$]
- If Not Exist(NAME$)
- Bell
- Paper 0
- Pen 1
- Centre At(,10)+"Please insert "+Paper$(3)+Pen$(0)+NAME$+Paper$(0)+Pen$(1)+" into any drive"
- While Not Exist(NAME$)
- Wend
- Print At(0,10);Space$(80);
- End If
- End Proc